package com.example.tmdraw;

import android.webkit.JavascriptInterface;

import com.google.gson.Gson;
import com.tenma.ventures.base.TMWebActivity;
import com.tenma.ventures.share.bean.TMLinkShare;
import com.tenma.ventures.share.util.TMShareUtil;

public class WebAty extends TMWebActivity {

    @JavascriptInterface
    public void share(String gsonStr){

        TmShareBea bean = new Gson().fromJson(gsonStr, TmShareBea.class);
        TMLinkShare share = new TMLinkShare();
        share.setThumb(bean.getImg());
        share.setDescription(bean.getDes());
        share.setUrl(bean.getUrl());
        share.setTitle(bean.getTitle());

        TMShareUtil.getInstance(this).shareLink(share);

    }
}
